package day03;
//每日作业 2024.8.2
public class DayHomeWork03 {
    public static void main(String[] args) {
        System.out.println("~~~~~~~~~~practice1~~~~~~~~~~~~");
        System.out.println(5%2);
        System.out.println(2%5);
        System.out.println(6%3);
        System.out.println("~~~~~~~~~~practice1~~~~~~~~~~~~");
        int a1 = 1,b1=2;
        a1++;
        ++b1;
        System.out.println(a1);
        System.out.println(b1);
        System.out.println("~~~~~~~~~~practice1~~~~~~~~~~~~");
        int c1=1,d1=2;
        int e1=c1++,f1=++d1;
        System.out.println(c1);
        System.out.println(d1);
        System.out.println(e1);
        System.out.println(f1);
        System.out.println("~~~~~~~~~~practice1~~~~~~~~~~~~");
        int c11=1,d11=2;
        int e11=c11--,f11=--d11;
        System.out.println(c11);
        System.out.println(d11);
        System.out.println(e11);
        System.out.println(f11);
        System.out.println("~~~~~~~~~~practice2~~~~~~~~~~~~");
        int a2=1,b2=2,c2=3;
        System.out.println(a2>=b2);
        System.out.println(a2<=b2);
        System.out.println(b2==c2);
        System.out.println(b2!=c2);

        System.out.println(a2+b2<=a2-c2);
        System.out.println(++a2>=b2--);
        System.out.println(--c2!=a2+b2);
        System.out.println("~~~~~~~~~~practice3~~~~~~~~~~~~");
        int a3=1,b3=2,c3=3;
        System.out.println(a3<=b3&&a3>b3);
        System.out.println(a3>c3&&a3<b3);
        System.out.println(a3<b3&&b3!=c3);
        System.out.println(a3==b3&&b3==c3);

        System.out.println(a3<=b3||a3>b3);
        System.out.println(a3>c3||a3<b3);
        System.out.println(a3<b3||b3!=c3);
        System.out.println(a3==b3||b3==c3);

        System.out.println(!(a3!=c3));
        System.out.println(!(a3>c3));

        System.out.println(a3>b3&&++a3>c3);
        System.out.println(a3<b3||--b3<c3);
        System.out.println(a3);
        System.out.println(b3);
        System.out.println("~~~~~~~~~~practice4~~~~~~~~~~~~");
        int a4=1;
        System.out.println(a4*=2);
        System.out.println(a4-=2);
        System.out.println(a4+=2);
        System.out.println(a4/=2);
        System.out.println(a4%=2);

        short s=2;
        s = (short) (s+10);
        System.out.println(s);
        s+=10;
        System.out.println(s);
        System.out.println("~~~~~~~~~~practice5~~~~~~~~~~~~");
        int age=22;
        String name = "wy";
        System.out.println(name+age);
        System.out.println(22+33+""+55);
        System.out.println(""+22+33+55);
        System.out.println("~~~~~~~~~~practice6~~~~~~~~~~~~");
        int a6=1,b6=2;
        int flag=a6>0?1:0,c6=a6>b6?1:2;
        System.out.println(flag);
        System.out.println("两个变量的最大值为："+c6);
        System.out.println("~~~~~~~~~~practice7~~~~~~~~~~~~");
        int price=500,score=90;
        if (price >= 500) {
            price*=0.8;
        }
        System.out.println(price);
        if (score >= 0 && score <= 100) {
            System.out.println("成绩合法："+score);
        }
        else {
            System.out.println("成绩不合法");
        }
        System.out.println("~~~~~~~~~~practice8~~~~~~~~~~~~");
        int price1=600,score1=101;
        if (price1 >= 500) {
            price1*=0.8;
        }else {
            price1*=0.9;
        }
        System.out.println(price1);
        if (score1 >= 0 && score1 <= 100) {
            System.out.println("成绩合法："+score1);
        }else {
            System.out.println("成绩不合法");
        }
        System.out.println("~~~~~~~~~~practice9~~~~~~~~~~~~");
        double money=2000.0;
        if (money >= 2000) {
            money*=0.5;
        } else if (money>=1000) {
            money*=0.7;
        } else if (money>=500) {
            money*=0.8;
        }else {
            money*=0.9;
        }
        System.out.println(money);
        System.out.println("~~~~~~~~~~practiceE~~~~~~~~~~~~");

    }
}
